package com.yipei.business.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yipei.business.domain.MlAccountMessage;
import com.yipei.business.mapper.MlAccountMessageMapper;
import com.yipei.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yipei.business.mapper.MlHolidayMapper;
import com.yipei.business.domain.MlHoliday;
import com.yipei.business.service.IMlHolidayService;

/**
 * 节日表Service业务层处理
 * 
 * @author yipei
 * @date 2025-01-22
 */
@Service
public class MlHolidayServiceImpl extends ServiceImpl<MlHolidayMapper, MlHoliday> implements IMlHolidayService
{
    @Autowired
    private MlHolidayMapper mlHolidayMapper;

    /**
     * 查询节日表
     * 
     * @param id 节日表主键
     * @return 节日表
     */
    @Override
    public MlHoliday selectMlHolidayById(Long id)
    {
        return mlHolidayMapper.selectMlHolidayById(id);
    }

    /**
     * 查询节日表列表
     * 
     * @param mlHoliday 节日表
     * @return 节日表
     */
    @Override
    public List<MlHoliday> selectMlHolidayList(MlHoliday mlHoliday)
    {
        return mlHolidayMapper.selectMlHolidayList(mlHoliday);
    }

    /**
     * 新增节日表
     * 
     * @param mlHoliday 节日表
     * @return 结果
     */
    @Override
    public int insertMlHoliday(MlHoliday mlHoliday)
    {
        mlHoliday.setCreateTime(DateUtils.getNowDate());
        return mlHolidayMapper.insertMlHoliday(mlHoliday);
    }

    /**
     * 修改节日表
     * 
     * @param mlHoliday 节日表
     * @return 结果
     */
    @Override
    public int updateMlHoliday(MlHoliday mlHoliday)
    {
        mlHoliday.setUpdateTime(DateUtils.getNowDate());
        return mlHolidayMapper.updateMlHoliday(mlHoliday);
    }

    /**
     * 批量删除节日表
     * 
     * @param ids 需要删除的节日表主键
     * @return 结果
     */
    @Override
    public int deleteMlHolidayByIds(Long[] ids)
    {
        return mlHolidayMapper.deleteMlHolidayByIds(ids);
    }

    /**
     * 删除节日表信息
     * 
     * @param id 节日表主键
     * @return 结果
     */
    @Override
    public int deleteMlHolidayById(Long id)
    {
        return mlHolidayMapper.deleteMlHolidayById(id);
    }
}
